using System;
using System.Collections.Generic;
using System.Text;

using Deepcode.Flux.Core.Services.Security;
using Deepcode.Flux.Core.Systems.Audit;

namespace Deepcode.Flux.Core.Systems.Audit.Quick
{
	/// <summary>
	/// The audit user class provides a quick way of obtaining
	/// a loggable username and user ID. If no user is logged in
	/// the info is defaulted to an unknown user.
	/// </summary>
	public class AuditUser : BaseAuditUser
	{
		public AuditUser()
		{
			AdministrationSecuritySession user = AdministrationSecurity.GetSession();
			if( user != null )
			{
				_UserID = user.PK_ID;
				_UserName = String.Format("{0} ({1})", user.RealName, user.Email);
			}
		}
	}
}
